home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / windows / mrun211.zip / MRUN211E.WAS < prev    next >
Text File  |  1993-05-01  |  20KB  |  745 lines

  1. ;MailRun v2.11:  Part E, addulfile
  2. ;1992-1993 Gerald P. Sully, all rights reserved.
  3.  
  4. #comment
  5. **************************************************************************
  6. **************************************************************************
  7. * This file contains routines related to adding a "Upload File"
  8. * item to a mailrun.  It puts up the Upload Files dialog box,
  9. * which displays the contents of the available files index (the
  10. * *.udx file for the mailrun).  When a file is selected from the 
  11. * list, a detailed description is displayed from the *.ubf file 
  12. * for the mailrun).
  13. **************************************************************************
  14. **************************************************************************
  15. #endcomment
  16.  
  17. #define MRUN211E
  18. #define MRUN211DE
  19.  
  20. #include "mrun211.h"
  21.  
  22. string DXFileTabs, OldUDX, OldUBF, MRunUDX, MRunUBF, LastChoice
  23. string UploadDir, DownloadDir, BBSChoice
  24. integer InULDir, ULSortField
  25.  
  26. #comment
  27. *********************************************************************
  28. * MAIN()
  29. * Calls checkchild(), updateudx(), interfaceon(), getnewdesc(),
  30. * getulfiles(), checkchanged(), getlastitem(), gettaskstring(), 
  31. * clearfiledesc(), makebbslist(), ulfilebox(), insertulfile(), 
  32. * delulfile(), menudim(), makefullname(), sortidx(), checkfile()
  33. * Adds a SendFile item to the mailrun.  An feditbox is
  34. * used to display the file description in order to take
  35. * advantage of wordwrap.  The flistbox displays the
  36. * contents of MAILRUN.UDX, which contains information on
  37. * any file downloaded by MailRun, plus additional files
  38. * found in the upload directory.  A file description must
  39. * be at least 6 characters, but may be as long as needed.
  40. *********************************************************************
  41. #endcomment
  42.  
  43. proc main
  44. string FullFileName, char, temp
  45. integer dialogstatus
  46. integer j, InUDX
  47.     menudim()
  48.     checkchild()
  49.     findfirst MailRun
  50.     MailRunTrunc = $FILENAME
  51.     DXFileTabs = "58,92,130,305,315,319,322,325,328"
  52.     profilerd MailRun "MailRun" "UploadDir" UploadDir
  53.     profilerd MailRun "MailRun" "DownloadDir" DownloadDir
  54.     profilerd MailRun "MailRun" "ULSortField" ULSortField
  55.     strextract BBSChoice TaskItem "`t" 3
  56.     strextract char TaskItem "`t" 4
  57.     atoi char j
  58.     FileDesc = makefullname(TempDir, "DESC.TMP")
  59.     OldUDX = makefullname(TempDir, "OLDUDX.TMP")
  60.     OldUBF = makefullname(TempDir, "OLDUBF.TMP")
  61.     MRunUDX = makefullname(MailRunDir, "MAILRUN.UDX")
  62.     MRunUBF = makefullname(MailRunDir, "MAILRUN.UBF")
  63.     if isfile FileDesc
  64.         delfile FileDesc
  65.     endif
  66.     if not (checkfile(MRunUDX) && checkfile(MRUNUBF))
  67.         getulfiles()
  68.     endif
  69.     LastChoice = ""
  70.     FLAGS &= UNCHANGED
  71.     interfaceon()
  72.     makebbslist()
  73.     ulfilebox()
  74.     dialogstatus = $DIALOG
  75.     while dialogstatus != 1
  76.         switch dialogstatus
  77.             case 10
  78.                 ;User selected "Add"
  79.                 insertulfile(&j)
  80.                 TaskItem = gettaskstring(BBSChoice, j)
  81.             endcase
  82.             case 11
  83.                 ;User selected "Save"
  84.                 if FLAGS & CHANGED
  85.                     updateudx()
  86.                     FLAGS &= UNCHANGED
  87.                     updatedlg -1
  88.                 endif
  89.             endcase
  90.             case 12
  91.                 ;User selected "Delete"
  92.                 delulfile()
  93.             endcase
  94.             case 13
  95.                 ;User selected "Refresh"
  96.                 statmsg "Refreshing Uploads List from Upload Directory..."
  97.                 getulfiles()
  98.                 updatedlg -1
  99.                 statmsg ""
  100.             endcase
  101.             case 50
  102.                 ;User selected a sort radiobutton
  103.                 profilewr MailRun "MailRun" "ULSortField" ULSortField
  104.                 sortidx(MRunUDX, ULSortField)
  105.                 updatedlg 16
  106.             endcase
  107.             case 130
  108.                 ;User selected a file from the listbox
  109.                 if checkchanged()
  110.                     getnewdesc()
  111.                     updatedlg 137
  112.                 else
  113.                     FileChoice = LastChoice
  114.                     updatedlg 16
  115.                 endif
  116.             endcase
  117.             case 170
  118.                 ;User changed BBSs with the combobox
  119.                 j = getlastitem(BBSChoice)
  120.                 TaskItem = gettaskstring(BBSChoice, j)
  121.             endcase
  122.             case 230
  123.                 ;User entered a name in the File Name box
  124.                 FullFileName = makefullname(UploadDir, FileName)
  125.                 if isfile FullFileName
  126.                     InULDir = 1
  127.                 else
  128.                     InULDir = 0
  129.                 endif
  130.                 interfaceoff()
  131.                 openfile(MRunUDXFile, MRunUDX, _READWRITE, _TEXT)
  132.                 InUDX = checkudx(FileName)
  133.                 if InUDX
  134.                     fseek MRunUDXFile -100 1
  135.                     fgets MRunUDXFile FileChoice
  136.                     fgets MRunUDXFile FileChoice
  137.                     strextract temp FileChoice "`t" 0
  138.                     while not strcmpi temp FileName
  139.                         fgets MRunUDXFile FileChoice
  140.                         strextract temp FileChoice "`t" 0
  141.                     endwhile
  142.                 endif
  143.                 fclose MRunUDXFile
  144.                 interfaceon()
  145.                 if InUDX
  146.                     makedesc(MRunUBF)
  147.                 else                
  148.                     clearfiledesc()
  149.                 endif
  150.                 updatedlg -1
  151.             endcase
  152.             case 250
  153.                 ;User entered a file description
  154.                 if !(FLAGS & CHANGED)
  155.                     FLAGS |= CHANGED
  156.                 endif
  157.             endcase
  158.         endswitch
  159.         dialogstatus = $DIALOG
  160.     endwhile
  161. endproc
  162.  
  163.  
  164. #comment
  165. *********************************************************************
  166. * INSERTULFILE()
  167. * Called by main()
  168. * Calls openfile(), updateudx(), insertitem(),
  169. * interfaceon(), interfaceoff(), makefullname(), checkudx(),
  170. * clearfiledesc(), shortdesc()
  171. * Adds a SendFile item to the *.MRN file and the task list.
  172. *********************************************************************
  173. #endcomment
  174.  
  175. proc insertulfile
  176. intparm j
  177. string ULDescString, ULFileString, FullFileName
  178. string ULFileSpec, StatString, CopyboxMsg
  179. integer ULDescLength, Perm, Response, InUDX
  180.     interfaceoff()
  181.     if NULLSTR FileName
  182.         ;User hasn't selected a file
  183.         usermsg "You must select a file first."
  184.         return
  185.     endif
  186.     if InULDir == 0
  187.         strupr FileName
  188.         strfmt CopyBoxMsg \
  189.             "%s is not in the Upload Directory.`r`nCopy it now?" \
  190.             FileName
  191.         strlwr FileName
  192.         sdlgmsgbox "MailRun Message" CopyBoxMsg QUESTION \
  193.             OKCANCEL Response 1
  194.         switch Response
  195.             case 1
  196.                 ;User selected "OK"
  197.                 ULFileSpec = makefullname(DownloadDir, FileName)
  198.                 dir ULFileSpec FullFileName
  199.                 if NULLSTR FullFileName
  200.                     return
  201.                 endif
  202.                 if not isfile FullFileName
  203.                     sdlgmsgbox "MailRun Message" "No such file!" \
  204.                         EXCLAMATION OK Response 1
  205.                     return
  206.                 endif
  207.                 copyfile FullFileName UploadDir
  208.                 if not strcmpi ULFileSpec FullFileName
  209.                     ;if the user chose a file other than the one specified
  210.                     ;get the name of the file
  211.                     findfirst FullFileName
  212.                     FileName = $FILENAME
  213.                     strlwr FileName
  214.                     ;determine whether it is already in the uploads database
  215.                     openfile(MRunUDXFile, MRunUDX, _READWRITE, _TEXT)
  216.                     InUDX = checkudx(FileName)
  217.                     fclose MRunUDXFile
  218.                     if InUDX == 0
  219.                         ;if it isn't in the uploads database, put it there
  220.                         clearfiledesc()
  221.                         FLAGS |= CHANGED
  222.                         updateudx()
  223.                     endif
  224.                 endif
  225.                 InULDir = 1
  226.                 updatedlg -1
  227.             endcase
  228.             case 2
  229.                 ;User selected "Cancel"
  230.                 return
  231.             endcase
  232.         endswitch
  233.     endif
  234.     ;No description may be less than 6 characters
  235.     openfile(FileDescFile, FileDesc, _READWRITE, _NORMAL)
  236.     fread FileDescFile ULDescString 65 ULDescLength
  237.     fclose FileDescFile
  238.     if ULDescLength < 6
  239.         usermsg "Please enter a longer description."
  240.     elseif shortdesc(ULDescString, ULDescLength)
  241.         ;If everything is OK...
  242.         if FLAGS & CHANGED
  243.             ;Add the new description to the database
  244.             updateudx()
  245.             FLAGS &= UNCHANGED
  246.             updatedlg 16
  247.         endif
  248.         Perm = 2 - PermRadio
  249.         strupr FileName
  250.         strfmt ULFileString \
  251.             "1,%d,SendFile,%s,%s" Perm FileName Conf
  252.         strfmt StatString \
  253.             "Added to %s:  `"Upload %s to Conference %s`"" \
  254.             BBSChoice FileName Conf
  255.         j++
  256.         insertitem(BBSChoice, j, ULFileString)
  257.         strlwr FileName
  258.         statmsg StatString
  259.     endif
  260.     interfaceon()
  261. endproc
  262.  
  263.  
  264. #comment
  265. *********************************************************************
  266. * SHORTDESC()
  267. * Called by insertulfile()
  268. * Calls findstring()
  269. * If the current BBS type is WildCat! or RBBS, limits the 
  270. * upload description length to 60 or 45 characters,
  271. * respectively.  Gives user an opportunity to enter a new 
  272. * description if the current one is too long.
  273. *********************************************************************
  274. #endcomment
  275.  
  276. func shortdesc : integer
  277. strparm ULDescString
  278. intparm ULDescLength
  279. string ULMsg, TypeName
  280. integer Response, MaxLength
  281.     profilerd MailRun BBSChoice "BBSType" BBSType
  282.     if (findstring(BBSType, "WildCat") && (ULDescLength > 60)) || \
  283.         (findstring(BBSType, "RBBS") && (ULDescLength > 45))
  284.         if findstring(BBSType, "WildCat")
  285.             substr ULDescString ULDescString 0 60
  286.             MaxLength = 60
  287.             TypeName = "WildCat!"
  288.         else
  289.             substr ULDescString UlDescString 0 45
  290.             MaxLength = 45
  291.             TypeName = "RBBS"
  292.         endif
  293.         strfmt ULMsg "A %s file description has a maximum length \
  294. of %d characters.  The description for %s will be truncated to read:\
  295. `r`n`r`n%s`r`n`r`nDo you wish to continue?" \
  296.             TypeName MaxLength FileName ULDescString
  297.         sdlgmsgbox "MailRun Message" ULMsg QUESTION YESNO Response 2
  298.         switch Response
  299.             case 6
  300.                 return 1
  301.             endcase
  302.             case 7
  303.                 return 0
  304.             endcase
  305.         endswitch
  306.     else
  307.         return 1
  308.     endif
  309. endfunc
  310.  
  311.  
  312. #comment
  313. *********************************************************************
  314. * DELULFILE()
  315. * Called by main()
  316. * Calls killfile(), makefullname()
  317. * Deletes a file from the upload database index.
  318. *********************************************************************
  319. #endcomment
  320.  
  321. proc delulfile
  322. string DelBoxMsg, FullFileName
  323. integer Response
  324.     if not NULLSTR FileName
  325.         if InULDir == 1
  326.             ;If the selected file is in the upload directory
  327.             strfmt DelBoxMsg "Delete file %s as well?" FileName
  328.             sdlgmsgbox "MailRun Message" DelBoxMsg QUESTION \
  329.                 YESNOCANCEL Response 1
  330.             switch Response
  331.                 case 2
  332.                     ;User selected "Cancel"
  333.                     return
  334.                 endcase
  335.                 case 6
  336.                     ;User selected "Yes"
  337.                     FullFileName = makefullname(UploadDir, FileName)
  338.                     delfile FullFileName
  339.                 case 7
  340.                     ;User selected "No"
  341.                     killfile()
  342.                 endcase
  343.             endswitch
  344.         else
  345.             killfile()
  346.         endif
  347.         FLAGS &= UNCHANGED
  348.         updatedlg -1
  349.     endif
  350. endproc
  351.  
  352.  
  353. #comment
  354. *********************************************************************
  355. * KILLFILE()
  356. * Called by delulfile()
  357. * Calls openfile(), clearfiledesc(), getnewdesc()
  358. * Deletes a file from the upload database index.
  359. *********************************************************************
  360. #endcomment
  361.  
  362. proc killfile
  363. string UDXString, UDXFile, temp
  364.     ;Copy all but the new description to the new UDX file
  365.     copyfile MRunUDX OldUDX
  366.     openfile(OldUDXFile, OldUDX, _READWRITE, _TEXT)
  367.     openfile(MRunUDXFile, MRunUDX, _CREATE, _TEXT)
  368.     fgets OldUDXFile UDXString
  369.     while not feof OldUDXFile
  370.         ;Read lines until the end of file or the current file
  371.         strextract UDXFile UDXString "`t" 0
  372.         if strcmpi UDXFile FileName
  373.             exitwhile
  374.         endif
  375.         fputs MRunUDXFile UDXString
  376.         fgets OldUDXFile UDXString
  377.     endwhile
  378.     fgets OldUDXFile UDXString
  379.     ;get the new listbox selection
  380.     FileChoice = UDXString
  381.     while not feof OldUDXFile
  382.         fputs MRunUDXFile UDXString
  383.         fgets OldUDXFile UDXString
  384.     endwhile
  385.     if NULLSTR FileChoice
  386.         ;if the deleted line was the last in the file
  387.         ;back up one line and read it
  388.         fseek MRunUDXFile -100 2
  389.         fgets MRunUDXFile temp
  390.         while not NULLSTR temp
  391.             FileChoice = temp
  392.             fgets MRunUDXFile temp
  393.         endwhile
  394.     endif
  395.     if not NULLSTR FileChoice
  396.         getnewdesc()
  397.     else
  398.         FileName = ""
  399.         clearfiledesc()
  400.     endif
  401.     fclose OldUDXFile
  402.     fclose MRunUDXFile
  403.     delfile OldUDX
  404. endproc
  405.  
  406.  
  407. #comment
  408. *********************************************************************
  409. * GETNEWDESC()
  410. * Called by main(), killfile()
  411. * Calls makedesc(), makefullname()
  412. * Gets the file name and description from the index entry
  413. * and determines whether the file is in the upload directory.
  414. *********************************************************************
  415. #endcomment
  416.  
  417. proc getnewdesc
  418. string FullFileName
  419.     LastChoice = FileChoice
  420.     strextract FileName FileChoice "`t" 0
  421.     FullFileName = makefullname(UploadDir, FileName)
  422.     if isfile FullFileName
  423.         InULDir = 1
  424.     else
  425.         InULDir = 0
  426.     endif
  427.     makedesc(MRunUBF)
  428. endproc
  429.  
  430.  
  431. #comment
  432. *********************************************************************
  433. * GETULFILES()
  434. * Called by main()
  435. * Calls openfile(), checkudx(), checkfile(), sortidx(),
  436. * interfaceon(), interfaceoff(), makefullname()
  437. * Updates the Upload directory file description database.
  438. *********************************************************************
  439. #endcomment
  440.  
  441. proc getulfiles
  442. string FileSize, FileDate, FDesc, DescBegin, DescLength, UDXString
  443. string ULFileFull, ULFileTrunc, FullFileName
  444. long FS, DB, DL, NDB, counter
  445. integer char
  446. integer InUDX
  447.     interfaceoff()
  448.     if checkfile(MRunUDX) && checkfile(MRunUBF)
  449.         copyfile MRunUDX OldUDX
  450.         copyfile MRunUBF OldUBF
  451.         openfile(OldUDXFile, OldUDX, _READWRITE, _TEXT)
  452.         openfile(OldUBFFile, OldUBF, _READWRITE, _NORMAL)
  453.     else
  454.         openfile(OldUDXFile, OldUDX, _CREATE, _TEXT)
  455.         openfile(OldUBFFile, OldUBF, _CREATE, _NORMAL)
  456.     endif
  457.     openfile(MRunUDXFile, MRunUDX, _CREATE, _TEXT)
  458.     openfile(MRunUBFFile, MRunUBF, _CREATE, _NORMAL)
  459.     fgets OldUDXFile UDXString
  460.     while not feof OldUDXFile
  461.         ;loop through the old .UDX file
  462.         ;extract all fields
  463.         strextract ULFileTrunc UDXString "`t" 0
  464.         strextract FileSize UDXString "`t" 1
  465.         strextract FileDate UDXString "`t" 2
  466.         strextract FDesc UDXString "`t" 3
  467.         strextract DescBegin UDXString "`t" 4
  468.         strextract DescLength UDXString "`t" 5
  469.         atol DescBegin DB
  470.         atol DescLength DL
  471.         ftell MRunUBFFile NDB
  472.         ;go to the beginning of the file description
  473.         fseek OldUBFFile DB 0
  474.         ;copy the description to the new .UBF file
  475.         for counter = 1 upto DL
  476.             fgetc OldUBFFile char
  477.             fputc MRunUBFFile char
  478.         endfor
  479.         ;add the index line to the new .UDX file
  480.         fstrfmt MRunUDXFile "%s`t%s`t%s`t%s`t%ld`t%ld`r`n" \
  481.             ULFileTrunc FileSize FileDate FDesc NDB DL
  482.         fgets OldUDXFile UDXString
  483.     endwhile
  484.     ;Add any new files found in the uploads directory
  485.     FullFileName = makefullname(UploadDir, "*.*")
  486.     findfirst FullFileName
  487.     while FOUND
  488.         ;Loop through all files in the upload directory
  489.         ULFileTrunc = $FILENAME
  490.         InUDX = checkudx(ULFileTrunc)
  491.         if InUDX == 0
  492.             ULFileFull = makefullname(UploadDir, ULFileTrunc)
  493.             getfsize ULFileFull FS
  494.             getfdate ULFileFull FileDate
  495.             strlwr ULFileTrunc
  496.             fseek MRunUDXFile 0 2
  497.             fstrfmt MRunUDXFile "%s`t%ld`t%s`t`t0`t0`r`n" \
  498.                 ULFileTrunc FS FileDate
  499.         endif
  500.         findnext
  501.     endwhile
  502.     fclose MRunUDXFile
  503.     fclose MRunUBFFile
  504.     fclose OldUDXFile
  505.     fclose OldUBFFile
  506.     delfile OldUDX
  507.     delfile OldUBF
  508.     interfaceon()
  509.     sortidx(MRunUDX, ULSortField)
  510. endproc
  511.  
  512.  
  513. #comment
  514. *********************************************************************
  515. * CHECKUDX()
  516. * Called by insertulfile(), getulfiles()
  517. * Checks whether a given file is already in the UDX List.
  518. * If it is, a value of 1 is returned, if not, the file
  519. * is added to the list and a value of 0 is returned.
  520. *********************************************************************
  521. #endcomment
  522.  
  523. func checkudx : integer
  524. strparm CkFileName
  525. string UDXFile, UDXFileString
  526. integer InUDX
  527.     rewind MRunUDXFile
  528.     InUDX = 0
  529.     fgets MRunUDXFile UDXFileString
  530.     while not feof MRunUDXFile
  531.         strextract UDXFile UDXFileString "`t" 0
  532.         if strcmpi CkFileName UDXFile
  533.             InUDX = 1
  534.             exitwhile
  535.         endif
  536.         fgets MRunUDXFile UDXFileString
  537.     endwhile
  538.     return InUDX
  539. endfunc
  540.  
  541.  
  542. #comment
  543. *********************************************************************
  544. * UPDATEUDX()
  545. * Called by main(), insertulfile()
  546. * Calls openfile(), interfaceon(), interfaceoff(),
  547. * makefullname(), sortidx()
  548. * Updates the Upload directory file description database
  549. * and index files.
  550. *********************************************************************
  551. #endcomment
  552.  
  553. proc updateudx
  554. string FileDate, FileSize, FullFileName
  555. string ULDescString, UDXString, UDXFile
  556. long DescBegin, DescLength, l
  557. integer ULDescLength
  558. integer char
  559.     interfaceoff()
  560.     ;Copy all but the new description to the new UDX file
  561.     copyfile MRunUDX OldUDX
  562.     openfile(OldUDXFile, OldUDX, _READWRITE, _TEXT)
  563.     openfile(MRunUDXFile, MRunUDX, _CREATE, _TEXT)
  564.     fgets OldUDXFile UDXString
  565.     while not feof OldUDXFile
  566.         ;Read lines until the end of file or the current file
  567.         strextract UDXFile UDXString "`t" 0
  568.         if strcmpi UDXFile FileName
  569.             exitwhile
  570.         endif
  571.         fputs MRunUDXFile UDXString
  572.         fgets OldUDXFile UDXString
  573.     endwhile
  574.     ;Get the size and date
  575.     if NULLSTR UDXString
  576.         FullFileName = makefullname(UploadDir, FileName)
  577.         if isfile FullFileName
  578.             getfsize FullFileName l
  579.             ltoa l FileSize
  580.             getfdate FullFileName FileDate
  581.             InULDir = 1
  582.         else
  583.             FileSize = "???"
  584.             FileDate = "??/??/??"
  585.             InULDir = 0
  586.         endif
  587.     else
  588.         strextract FileSize UDXString "`t" 1
  589.         strextract FileDate UDXString "`t" 2
  590.     endif
  591.     ;Discard the old description line
  592.     fgets OldUDXFile UDXString
  593.     FileChoice = UDXString
  594.     while not feof OldUDXFile
  595.         fputs MRunUDXFile UDXString
  596.         fgets OldUDXFile UDXString
  597.     endwhile
  598.     openfile(MRunUBFFile, MRunUBF, _READWRITE, _NORMAL)
  599.     ;go to the end of the description database
  600.     fseek MRunUBFFile 0 2
  601.     ftell MRunUBFFile DescBegin
  602.     DescLength = 0
  603.     ULDescLength = 0
  604.     ULDescString = ""
  605.     
  606.     ;read characters from the description box into the database
  607.     openfile(FileDescFile, FileDesc, _READWRITE, _NORMAL)
  608.     fgetc FileDescFile char
  609.     while not feof FileDescFile
  610.         ;read characters until all have been read
  611.         if ((char >= 0x20) && (char <= 0x7E)) || \
  612.             ((char >= 0xA0) && (char <= 0xFE))
  613.             ;Ignore non-printing characters
  614.             fputc MRunUBFFile char
  615.             if ULDescLength < 46
  616.                 ;No special characters in the index file either
  617.                 strfmt ULDescString "%s%c" ULDescString char
  618.                 ULDescLength++
  619.             endif
  620.             DescLength++
  621.         endif
  622.         fgetc FileDescFile char
  623.     endwhile
  624.     fclose MRunUBFFile
  625.     fclose FileDescFile
  626.     
  627.     ;Strip partial words from end of description
  628.     if ULDescLength == 46
  629.         ULDescLength--
  630.         strpeek ULDescString ULDescLength char
  631.         while char > 32
  632.             strdelete ULDescString ULDescLength 1
  633.             ULDescLength--
  634.             strpeek ULDescString ULDescLength char
  635.         endwhile
  636.     endif
  637.     
  638.     strfmt FileChoice "%s`t%s`t%s`t%s`t%ld`t%ld" \
  639.         FileName FileSize FileDate ULDescString DescBegin DescLength
  640.     fputs MRunUDXFile FileChoice
  641.     fclose OldUDXFile
  642.     fclose MRunUDXFile
  643.     delfile OldUDX
  644.     sortidx(MRunUDX, ULSortField)
  645.     interfaceon()
  646. endproc
  647.  
  648.  
  649. #comment
  650. *********************************************************************
  651. * ULFILEBOX()
  652. * Called by main()
  653. * Draws the Upload Files Dialog Box.
  654. *********************************************************************
  655. #endcomment
  656.  
  657. proc ulfilebox
  658. PermRadio = 2
  659. Conf = "0"
  660. FileName = ""
  661. destroydlg
  662. HelpPage = 10
  663. dialogbox 19 38 324 201 15 "Upload Files" HELPID HelpPage
  664.    text  12 27 56 8 left "Filename"
  665.    text  70 27 40 8 left "Size"
  666.    text  104 27 34 8 left "Date"
  667.    text  142 27 117 8 left "Description"
  668.    flistbox 12 38 300 50 MRunUDX DXFileTabs single FileChoice
  669.    groupbox 12 89 300 17
  670.    radiobutton 26 94 60 11 "Unsorted" ULSortField
  671.    radiobutton 91 94 67 11 "Sort by Name" 
  672.    radiobutton 172 94 61 11 "Sort by Size" 
  673.    radiobutton 241 94 62 11 "Sort by Date" endgroup
  674.    text  13 112 49 8 left "Filename:"
  675.    editbox 12 122 101 12 FileName
  676.    text  129 112 67 8 left "Description:"
  677.    feditbox 129 122 182 50 FileDesc
  678.    text  14 158 78 8 right "U/L to Conference:"
  679.    editbox 96 156 16 12 Conf
  680.    radiobutton 12 178 53 13 "Permanent" PermRadio
  681.    radiobutton 70 178 54 13 "Temporary" endgroup
  682.    pushbutton 130 179 30 14 "&Add" normal default
  683.    pushbutton 168 179 30 14 "&Save" normal
  684.    pushbutton 206 179 30 14 "De&lete" normal
  685.    pushbutton 244 179 30 14 "&Refresh" normal
  686.    pushbutton 282 179 30 14 "&Done" cancel
  687.    text  76 9 80 8 right "Upload File to:"
  688.    combobox 160 7 70 42 BBSList BBSChoice sort
  689.    checkbox 13 140 100 10 "File in uploads directory?" InULDir
  690. enddialog
  691. disable CTRL 70
  692. endproc
  693.  
  694.  
  695.  
  696.